<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title value='guanggao'>广告</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />

    <style>
    .back1 {
      width: 10px !important;
      height: 16px !important;
      margin-top: 15px;
      margin-left: 15px;
    }
    #aui-header{
      padding-bottom: 8px;
      font-size:19px;
    }
    </style>
</head>

<body>
  <header class="aui-bar aui-bar-nav" id="aui-header" style="background-color:#ea5718;">
      <div class="aui-pull-left" onclick="closeWin()">
          <img src="../../image/login/back.png" class="back1" alt="">
      </div>
      <div class="aui-title">下载</div>
  </header>

</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" >
apiready = function() {
  var header = $api.byId('aui-header');
  $api.fixStatusBar(header);
  var headerPos = $api.offset(header);
  var frmname =document.querySelector("title").getAttribute('value');
  var begionurl =api.pageParam.url
  function texttohtml(begionurl) {
    var div = document.createElement('div');
    div.innerHTML = begionurl
    return div.textContent
  }
  begionurl=texttohtml(begionurl)
  console.log(begionurl)
  api.openFrame({
      name: frmname,
      url: begionurl,
      bounces: false,
      rect: {
          x: 0,
          y: headerPos.h,
          w: 'auto',
          h: api.winHeight - headerPos.h
      },
      progress:{
        type:"page",                //加载进度效果类型，默认值为default，取值范围为default|page，default等同于showProgress参数效果；为page时，进度效果为仿浏览器类型，固定在页面的顶部
        title:"",               //type为default时显示的加载框标题
        text:"",                //type为default时显示的加载框内容
        color:"#F86E12"                //type为page时进度条的颜色，默认值为#45C01A，支持#FFF，#FFFFFF，rgb(255,255,255)，rgba(255,255,255,1.0)等格式
      },
      animation:{
          type:"none",                //动画类型（详见动画类型常量）
          subType:"from_right",       //动画子类型（详见动画子类型常量）
          duration:300                //动画过渡时间，默认300毫秒
      },
  })
};
function closeWin() {
    api.sendEvent({
        name: 'playvideoad'
    });
    api.closeWin({});
}

</script>
</html>
